QUALIFIED
data structures result in cleaner code because you can’t reference the fields without using the qualifying name. They also
allow you to have multiple sub-fields with the same name, meaning subfield names don’t have to be convoluted for uniqueness, and can be expressive
instead.
Noncompliant code example
* Noncompliant
D Employee DS
D EmpId 7P 0
D EFName 30A
D ELName 30A
D EPhone 11P 0
* Noncompliant
D Contractor DS
D CntId 7P 0
D CFName 30A
D CLName 30A
D CPhone 11P 0
/free
EmpId = '000220';
/end-free
Compliant solution
D Employee DS QUALIFIED
D Id 7P 0
D FName 30A
D LName 30A
D Phone 11P 0
D Contractor DS QUALIFIED
D Id 7P 0
D FName 30A
D LName 30A
D Phone 11P 0
/free
Employee.Id = '000220';
/end-free